<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script type="text/javascript" src="saveMoudle/Ajax/getGoodsInfoAjax.js"></script>
<script type="text/javascript" src="saveMoudle/Ajax/UpdateMoudle.js"></script>
<script>
    $(function () {
        //加载该页面前，先判断该模块的权限
        //获取当前登录的用户的权限
        var permission = document.cookie.split(";")[1].split("=")[1];
        var b = String(permission).split('');
        for (var i = 0; i < b.length; i++) {
            console.log(b[i]);
        }
        var moudle13 = b[3];
        //如果模块权限为1，即只能查询此模块下的数据，不能进行修改（禁用和重置密码不能使用）
        //系统管理
        if (moudle13 == 1) {
            $(".shezhi").attr("disabled","disabled");
        }
    })
</script>
<style type="text/css">
    table{
        width: 100%;
    }
    .selected{
        color: white;
        height: 25px;
        width: 100px;
        margin-top: 10px;
        margin-bottom: 20px;
        margin-left: 50px;
        border-color: #1ab7ea;
        appearance:none;
        -moz-appearance:none;
        -webkit-appearance:none;
        background: url("http://ourjs.github.io/static/2015/arrow.png") no-repeat scroll right center transparent;
    }
    #input-seach{
        position: absolute;
        margin-left: 550px;
        margin-top: 6px;
        height: 30px;
        width: 300px;
        border: violet 2px solid;
    }

    #a-add{
        position: absolute;
        font-size: 80px;
        color: aquamarine;
        margin-left: 890px;
        margin-top: -35px;
        text-decoration: none;
    }

    .input-del,.input-update{
        height: 30px;
        width: 60px;
        border: none;
        background-color: orange;
        font-size:medium;
        margin-left: 20px;
    }
    td{
        text-align: center;
    }
    #buttons-seach{
        position: absolute;
        margin-left: 860px;
        margin-top: 10px;
        border: none;
        background-color: black;
        font-size: large;
    }
    #div-cutpage{

        position: absolute;
        margin-top: -20px;
        margin-left: 800px;
    }

</style>
<body>
<div class="grid-table" style="height: 615px;width: 100%;">


    <table  class="">
        <thead style="background-color:skyblue">
        <tr>
            <td>产品ID</td>
            <td>产品名称</td>
            <td>产品系列</td>
            <td>问题模组</td>
        </tr>
        </thead>
        <tbody>
        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button" data-toggle="modal" data-target="#goodsAndquestionMoudle"value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>
        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        <tr class="tbody-tr" style="display: none">
            <td class="td-id">11</td>
            <td class="td-name">11</td>
            <td class="td-series">22</td>
            <td><span class="td-questionMoudle">11</span> <input class="shezhi" type="button"data-toggle="modal" data-target="#goodsAndquestionMoudle" value="设置" onclick="setQuestionMoudle(this)"></td>
        </tr>

        </tbody>
    </table>

</div>

<div class="modal fade bs-example-modal-lg" id="goodsAndquestionMoudle" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <form id="editPasswordForm" role="form"  class="form-horizontal">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="indexModeltitle">添加模组</h4>
                </div>

                <div class="modal-body">
                    <div class="col-xs-8 col-xs-offset-2">
                        <input  type="hidden" id="indexId" name="indexId" value="0" />

                        <div class="form-group" id="div-id">
                            <label for="moudle-name" class="col-sm-2 control-label">模组id：</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control-static" disabled="disabled" style="width: 260px;height: 34px" id="input-id" name="indexMechanismCode"  value="">
                            </div>
                        </div>

                        <div class="form-group" id="div-name">
                            <label for="moudle-name" class="col-sm-2 control-label">产品名：</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control" disabled="disabled" id="moudle-name" name="indexMechanismCode" onchange="" value="">
                            </div>
                        </div>



                        <div class="form-group">
                            <label for="select-moudle" class="col-sm-2 control-label" onclick="" id="lable-question10">模组：</label>
                            <div class="col-sm-6">
                                <select class="form-control" id="select-moudle" onchange="checkNotZero()">
                                    <option selected value="0">请选择</option>
                                </select>
                            </div>
                        </div>

                    </div>
                    <div class="clearfix"></div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close button-in-i"></i>取消</button>
                    <button type="button" class="btn btn-primary" data-dismiss="modal" id="indexUpdateBtn" onclick="updateGoodsMoudle()"><i class="fa fa-check button-in-i"></i>保存</button>
                    <span></span>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>